# $Id: Makefile 30 2013-01-13 10:16:02Z chris.charles.allison@gmail.com $
# compiler settings for all makefiles

CC = gcc
CFLAGS = -ggdb -W -Wall
LD = $(CC)
LDFLAGS =

SRC := $(wildcard *.c)
OBJ := $(SRC:.c=.o)
DOBJ := $(SRC:.c=.d)

BINNAME = qills

$(BINNAME): $(OBJ)
	$(CC) -o $@ $(OBJ)

include $(OBJ:.o=.d)

mysql.d: mysql.c
	$(CC) $(mysql_config --cflags) -c -o mysql.o mysql.c $(mysql-config --libs)

%.d: %.c
	depend.sh $(CFLAGS) $*.c > $@

clean:
	-rm -f $(DOBJ) $(OBJ) $(BINNAME)


